Integrand size = 24, antiderivative size = 339 \[ \int \frac {(f+g x)^3}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx=\frac {e^{-\frac {a}{b n}} (e f-d g)^3 (d+e x) \left (c (d+e x)^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {6 e^{-\frac {2 a}{b n}} g (e f-d g)^2 (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {9 e^{-\frac {3 a}{b n}} g^2 (e f-d g) (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {4 e^{-\frac {4 a}{b n}} g^3 (d+e x)^4 \left (c (d+e x)^n\right )^{-4/n} \operatorname {ExpIntegralEi}\left (\frac {4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}-\frac {(d+e x) (f+g x)^3}{b e n \left (a+b \log \left (c (d+e x)^n\right )\right )} \]
[Out]
Time = 0.53 (sec) , antiderivative size = 339, normalized size of antiderivative = 1.00, number of steps used = 26, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {2447, 2446, 2436, 2337, 2209, 2437, 2347} \[ \int \frac {(f+g x)^3}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx=\frac {9 g^2 e^{-\frac {3 a}{b n}} (d+e x)^3 (e f-d g) \left (c (d+e x)^n\right )^{-3/n} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {6 g e^{-\frac {2 a}{b n}} (d+e x)^2 (e f-d g)^2 \left (c (d+e x)^n\right )^{-2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {e^{-\frac {a}{b n}} (d+e x) (e f-d g)^3 \left (c (d+e x)^n\right )^{-1/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {4 g^3 e^{-\frac {4 a}{b n}} (d+e x)^4 \left (c (d+e x)^n\right )^{-4/n} \operatorname {ExpIntegralEi}\left (\frac {4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}-\frac {(d+e x) (f+g x)^3}{b e n \left (a+b \log \left (c (d+e x)^n\right )\right )} \]
[In]
[Out]
Rule 2209
Rule 2337
Rule 2347
Rule 2436
Rule 2437
Rule 2446
Rule 2447
Rubi steps \begin{align*} \text {integral}& = -\frac {(d+e x) (f+g x)^3}{b e n \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {4 \int \frac {(f+g x)^3}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b n}-\frac {(3 (e f-d g)) \int \frac {(f+g x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b e n} \\ & = -\frac {(d+e x) (f+g x)^3}{b e n \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {4 \int \left (\frac {(e f-d g)^3}{e^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {3 g (e f-d g)^2 (d+e x)}{e^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {3 g^2 (e f-d g) (d+e x)^2}{e^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {g^3 (d+e x)^3}{e^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}\right ) \, dx}{b n}-\frac {(3 (e f-d g)) \int \left (\frac {(e f-d g)^2}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {2 g (e f-d g) (d+e x)}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {g^2 (d+e x)^2}{e^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}\right ) \, dx}{b e n} \\ & = -\frac {(d+e x) (f+g x)^3}{b e n \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {\left (4 g^3\right ) \int \frac {(d+e x)^3}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b e^3 n}-\frac {\left (3 g^2 (e f-d g)\right ) \int \frac {(d+e x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b e^3 n}+\frac {\left (12 g^2 (e f-d g)\right ) \int \frac {(d+e x)^2}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b e^3 n}-\frac {\left (6 g (e f-d g)^2\right ) \int \frac {d+e x}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b e^3 n}+\frac {\left (12 g (e f-d g)^2\right ) \int \frac {d+e x}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b e^3 n}-\frac {\left (3 (e f-d g)^3\right ) \int \frac {1}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b e^3 n}+\frac {\left (4 (e f-d g)^3\right ) \int \frac {1}{a+b \log \left (c (d+e x)^n\right )} \, dx}{b e^3 n} \\ & = -\frac {(d+e x) (f+g x)^3}{b e n \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {\left (4 g^3\right ) \text {Subst}\left (\int \frac {x^3}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b e^4 n}-\frac {\left (3 g^2 (e f-d g)\right ) \text {Subst}\left (\int \frac {x^2}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b e^4 n}+\frac {\left (12 g^2 (e f-d g)\right ) \text {Subst}\left (\int \frac {x^2}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b e^4 n}-\frac {\left (6 g (e f-d g)^2\right ) \text {Subst}\left (\int \frac {x}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b e^4 n}+\frac {\left (12 g (e f-d g)^2\right ) \text {Subst}\left (\int \frac {x}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b e^4 n}-\frac {\left (3 (e f-d g)^3\right ) \text {Subst}\left (\int \frac {1}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b e^4 n}+\frac {\left (4 (e f-d g)^3\right ) \text {Subst}\left (\int \frac {1}{a+b \log \left (c x^n\right )} \, dx,x,d+e x\right )}{b e^4 n} \\ & = -\frac {(d+e x) (f+g x)^3}{b e n \left (a+b \log \left (c (d+e x)^n\right )\right )}+\frac {\left (4 g^3 (d+e x)^4 \left (c (d+e x)^n\right )^{-4/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {4 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b e^4 n^2}-\frac {\left (3 g^2 (e f-d g) (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {3 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b e^4 n^2}+\frac {\left (12 g^2 (e f-d g) (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {3 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b e^4 n^2}-\frac {\left (6 g (e f-d g)^2 (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b e^4 n^2}+\frac {\left (12 g (e f-d g)^2 (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b e^4 n^2}-\frac {\left (3 (e f-d g)^3 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b e^4 n^2}+\frac {\left (4 (e f-d g)^3 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \text {Subst}\left (\int \frac {e^{\frac {x}{n}}}{a+b x} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{b e^4 n^2} \\ & = \frac {e^{-\frac {a}{b n}} (e f-d g)^3 (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {Ei}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {6 e^{-\frac {2 a}{b n}} g (e f-d g)^2 (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {Ei}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {9 e^{-\frac {3 a}{b n}} g^2 (e f-d g) (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {Ei}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}+\frac {4 e^{-\frac {4 a}{b n}} g^3 (d+e x)^4 \left (c (d+e x)^n\right )^{-4/n} \text {Ei}\left (\frac {4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )}{b^2 e^4 n^2}-\frac {(d+e x) (f+g x)^3}{b e n \left (a+b \log \left (c (d+e x)^n\right )\right )} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(1674\) vs. \(2(339)=678\).
Time = 0.46 (sec) , antiderivative size = 1674, normalized size of antiderivative = 4.94 \[ \int \frac {(f+g x)^3}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx=\frac {e^{-\frac {4 a}{b n}} \left (c (d+e x)^n\right )^{-4/n} \left (-b d e^3 e^{\frac {4 a}{b n}} f^3 n \left (c (d+e x)^n\right )^{4/n}-b e^4 e^{\frac {4 a}{b n}} f^3 n x \left (c (d+e x)^n\right )^{4/n}-3 b d e^3 e^{\frac {4 a}{b n}} f^2 g n x \left (c (d+e x)^n\right )^{4/n}-3 b e^4 e^{\frac {4 a}{b n}} f^2 g n x^2 \left (c (d+e x)^n\right )^{4/n}-3 b d e^3 e^{\frac {4 a}{b n}} f g^2 n x^2 \left (c (d+e x)^n\right )^{4/n}-3 b e^4 e^{\frac {4 a}{b n}} f g^2 n x^3 \left (c (d+e x)^n\right )^{4/n}-b d e^3 e^{\frac {4 a}{b n}} g^3 n x^3 \left (c (d+e x)^n\right )^{4/n}-b e^4 e^{\frac {4 a}{b n}} g^3 n x^4 \left (c (d+e x)^n\right )^{4/n}+a e^3 e^{\frac {3 a}{b n}} f^3 (d+e x) \left (c (d+e x)^n\right )^{3/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )-3 a d e^2 e^{\frac {3 a}{b n}} f^2 g (d+e x) \left (c (d+e x)^n\right )^{3/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )+3 a d^2 e e^{\frac {3 a}{b n}} f g^2 (d+e x) \left (c (d+e x)^n\right )^{3/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )-a d^3 e^{\frac {3 a}{b n}} g^3 (d+e x) \left (c (d+e x)^n\right )^{3/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right )+6 a e^2 e^{\frac {2 a}{b n}} f^2 g (d+e x)^2 \left (c (d+e x)^n\right )^{2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )-12 a d e e^{\frac {2 a}{b n}} f g^2 (d+e x)^2 \left (c (d+e x)^n\right )^{2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )+6 a d^2 e^{\frac {2 a}{b n}} g^3 (d+e x)^2 \left (c (d+e x)^n\right )^{2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )+9 a e e^{\frac {a}{b n}} f g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )-9 a d e^{\frac {a}{b n}} g^3 (d+e x)^3 \left (c (d+e x)^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )+4 a g^3 (d+e x)^4 \operatorname {ExpIntegralEi}\left (\frac {4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right )+b e^3 e^{\frac {3 a}{b n}} f^3 (d+e x) \left (c (d+e x)^n\right )^{3/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right ) \log \left (c (d+e x)^n\right )-3 b d e^2 e^{\frac {3 a}{b n}} f^2 g (d+e x) \left (c (d+e x)^n\right )^{3/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right ) \log \left (c (d+e x)^n\right )+3 b d^2 e e^{\frac {3 a}{b n}} f g^2 (d+e x) \left (c (d+e x)^n\right )^{3/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right ) \log \left (c (d+e x)^n\right )-b d^3 e^{\frac {3 a}{b n}} g^3 (d+e x) \left (c (d+e x)^n\right )^{3/n} \operatorname {ExpIntegralEi}\left (\frac {a+b \log \left (c (d+e x)^n\right )}{b n}\right ) \log \left (c (d+e x)^n\right )+6 b e^2 e^{\frac {2 a}{b n}} f^2 g (d+e x)^2 \left (c (d+e x)^n\right )^{2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right ) \log \left (c (d+e x)^n\right )-12 b d e e^{\frac {2 a}{b n}} f g^2 (d+e x)^2 \left (c (d+e x)^n\right )^{2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right ) \log \left (c (d+e x)^n\right )+6 b d^2 e^{\frac {2 a}{b n}} g^3 (d+e x)^2 \left (c (d+e x)^n\right )^{2/n} \operatorname {ExpIntegralEi}\left (\frac {2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right ) \log \left (c (d+e x)^n\right )+9 b e e^{\frac {a}{b n}} f g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right ) \log \left (c (d+e x)^n\right )-9 b d e^{\frac {a}{b n}} g^3 (d+e x)^3 \left (c (d+e x)^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (\frac {3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right ) \log \left (c (d+e x)^n\right )+4 b g^3 (d+e x)^4 \operatorname {ExpIntegralEi}\left (\frac {4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{b n}\right ) \log \left (c (d+e x)^n\right )\right )}{b^2 e^4 n^2 \left (a+b \log \left (c (d+e x)^n\right )\right )} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 1.70 (sec) , antiderivative size = 9517, normalized size of antiderivative = 28.07
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 681, normalized size of antiderivative = 2.01 \[ \int \frac {(f+g x)^3}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx=\frac {{\left (9 \, {\left (a e f g^{2} - a d g^{3} + {\left (b e f g^{2} - b d g^{3}\right )} n \log \left (e x + d\right ) + {\left (b e f g^{2} - b d g^{3}\right )} \log \left (c\right )\right )} e^{\left (\frac {b \log \left (c\right ) + a}{b n}\right )} \operatorname {log\_integral}\left ({\left (e^{3} x^{3} + 3 \, d e^{2} x^{2} + 3 \, d^{2} e x + d^{3}\right )} e^{\left (\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}\right ) + 6 \, {\left (a e^{2} f^{2} g - 2 \, a d e f g^{2} + a d^{2} g^{3} + {\left (b e^{2} f^{2} g - 2 \, b d e f g^{2} + b d^{2} g^{3}\right )} n \log \left (e x + d\right ) + {\left (b e^{2} f^{2} g - 2 \, b d e f g^{2} + b d^{2} g^{3}\right )} \log \left (c\right )\right )} e^{\left (\frac {2 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )} \operatorname {log\_integral}\left ({\left (e^{2} x^{2} + 2 \, d e x + d^{2}\right )} e^{\left (\frac {2 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}\right ) + {\left (a e^{3} f^{3} - 3 \, a d e^{2} f^{2} g + 3 \, a d^{2} e f g^{2} - a d^{3} g^{3} + {\left (b e^{3} f^{3} - 3 \, b d e^{2} f^{2} g + 3 \, b d^{2} e f g^{2} - b d^{3} g^{3}\right )} n \log \left (e x + d\right ) + {\left (b e^{3} f^{3} - 3 \, b d e^{2} f^{2} g + 3 \, b d^{2} e f g^{2} - b d^{3} g^{3}\right )} \log \left (c\right )\right )} e^{\left (\frac {3 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )} \operatorname {log\_integral}\left ({\left (e x + d\right )} e^{\left (\frac {b \log \left (c\right ) + a}{b n}\right )}\right ) - {\left (b e^{4} g^{3} n x^{4} + b d e^{3} f^{3} n + {\left (3 \, b e^{4} f g^{2} + b d e^{3} g^{3}\right )} n x^{3} + 3 \, {\left (b e^{4} f^{2} g + b d e^{3} f g^{2}\right )} n x^{2} + {\left (b e^{4} f^{3} + 3 \, b d e^{3} f^{2} g\right )} n x\right )} e^{\left (\frac {4 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )} + 4 \, {\left (b g^{3} n \log \left (e x + d\right ) + b g^{3} \log \left (c\right ) + a g^{3}\right )} \operatorname {log\_integral}\left ({\left (e^{4} x^{4} + 4 \, d e^{3} x^{3} + 6 \, d^{2} e^{2} x^{2} + 4 \, d^{3} e x + d^{4}\right )} e^{\left (\frac {4 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}\right )\right )} e^{\left (-\frac {4 \, {\left (b \log \left (c\right ) + a\right )}}{b n}\right )}}{b^{3} e^{4} n^{3} \log \left (e x + d\right ) + b^{3} e^{4} n^{2} \log \left (c\right ) + a b^{2} e^{4} n^{2}} \]
[In]
[Out]
\[ \int \frac {(f+g x)^3}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx=\int \frac {\left (f + g x\right )^{3}}{\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right )^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {(f+g x)^3}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx=\int { \frac {{\left (g x + f\right )}^{3}}{{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}} \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 3473 vs. \(2 (341) = 682\).
Time = 0.42 (sec) , antiderivative size = 3473, normalized size of antiderivative = 10.24 \[ \int \frac {(f+g x)^3}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {(f+g x)^3}{\left (a+b \log \left (c (d+e x)^n\right )\right )^2} \, dx=\int \frac {{\left (f+g\,x\right )}^3}{{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^2} \,d x \]
[In]
[Out]